package com.epcs.model.dto;
// Generated 11:42:59 01-02-2014 by Hibernate Tools 3.2.1.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Eventcategory generated by hbm2java
 */
@Entity
@Table(name = "eventcategory", catalog = "epcs")
public class Eventcategory implements java.io.Serializable {

    private Integer eventCategoryId;
    private String eventCategoryName;
    private Boolean isActive;
    private Set<Event> events = new HashSet<Event>(0);

    public Eventcategory() {
    }

    public Eventcategory(String eventCategoryName) {
        this.eventCategoryName = eventCategoryName;
    }

    public Eventcategory(String eventCategoryName, Set<Event> events, Boolean isActive) {

        this.isActive = isActive;
        this.eventCategoryName = eventCategoryName;
        this.events = events;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "eventCategoryID", unique = true, nullable = false)
    public Integer getEventCategoryId() {
        return this.eventCategoryId;
    }

    public void setEventCategoryId(Integer eventCategoryId) {
        this.eventCategoryId = eventCategoryId;
    }

    @Column(name = "isActive")
    public Boolean getIsActive() {
        return this.isActive;
    }

    public void setIsActive(Boolean isActive) {
        this.isActive = isActive;
    }

    @Column(name = "eventCategoryName", nullable = false, length = 45)
    public String getEventCategoryName() {
        return this.eventCategoryName;
    }

    public void setEventCategoryName(String eventCategoryName) {
        this.eventCategoryName = eventCategoryName;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "eventcategory")
    public Set<Event> getEvents() {
        return this.events;
    }

    public void setEvents(Set<Event> events) {
        this.events = events;
    }
}
